<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_变量与常量</title>
</head>
<body>
<script>
    //JS是一门弱类型的语言
    var a = 1;
    console.log(a);
    var b = 3.14;
    console.log(b);
    var c = true;
    console.log(c);
    c = false;
    console.log(c);
    c = '今天星期一!';
    console.log(c);
    var c = "我又来了!";
    console.log(c);

    //使用let关键字来声明变量
    let x = 1;
    console.log(x);
    //let x = 2;//let在同一作用域下不可以重复声明!
    //console.log(x);

    //使用const关键字来声明常量
    const y = 2;
    console.log(y);
    //y = 3;//常量的值不允许被修改!

</script>
</body>
</html>